<?php  
   $attributes = array('role' => 'form','class'=>'form-horizontal','id'=>'insert_chuyenbay');
   echo form_open('',$attributes);
?>                           
       <div class="panel panel-info" >
                <div class="panel-heading">
                    <h3 class="panel-title" style="font-size: 1.45em !important;">Lên lịch chuyến bay</h3>
                </div>      
            <div class="panel-body">   
                 <table class="table table-striped table_dangky">
                     <tr>
                         <td  class="info">Trạng thái</td>
                         <td>
                             <select name="trangthai" id="trangthai" Class="form-control" required >
                                <option value="" disabled selected>Trạng Thái</option>
                                <option value="CB">CB</option>
                                <option value="DB">DB</option>
                                <option value="HB">HB</option>
                            </select>
                         </td>
                     </tr>
                     
                     <tr>
                         <td class="info">Sân bay đi</td>
                         <td>
                             <select name="from" id="from1" Class="form-control" required >
                            <option value="" disabled selected>Sân bay đi...</option>
                            <?php foreach ($sanbaydi as $row) {
                                    echo '<option value="'.$row['MSG'].'">'.$row['TENSB'].', '.$row['THANHPHO'].', '.$row['QUOCGIA'].'</option>';
                                  }
                            ?>
                        </select>
                         </td>
                     </tr>
                     
                     <tr>
                         <td class="info">Sân bay đến</td>
                         <td>
                             <select name="to" id="to1" Class="form-control" required >
                            <option value="" disabled selected>Sân bay đến...</option>
                            
                        </select>
                         </td>
                     </tr>
                     
                     <tr>
                         <td class="info">Mã số máy bay</td>
                         <td>
                             <input type="text" id="MSMB" Class="form-control" name="MSMB" value=""  placeholder="MSMB..." required pattern="SAP[0-9]{3}"/></
                        </select>
                         </td>
                     </tr>
                     <tr>
                         <td class="info">Thời điểm đi</td>
                         <td>
                             <div><input type="datetime-local" name="date_di" Class="form-control" value="<?php echo date('Y-m-d');?>" required></div>
                         </td>
                     </tr>
                     
                     <tr>
                         <td class="info">Thời điểm đến</td>
                         <td>
                             <div><input type="datetime-local" name="date_den" Class="form-control" value="<?php echo date('Y-m-d');?>" required></div>
                         </td>
                     </tr>
                     
                     <tr>
                         <td class="info">Economy</td>
                         <td>
                             <input type="text" id="economy" Class="form-control" name="economy" value="" placeholder="Economy..."/>
                         </td>
                     </tr>
                     
                     <tr>
                         <td class="info">Business</td>
                         <td>
                             <input type="text" id="business" Class="form-control" name="business" value="" placeholder="Business..."/>
                         </td>
                     </tr>
                     
                     <tr>
                         <td class="info">Saver_Flex</td>
                         <td>
                             <input type="text" id="Saver_Flex" Class="form-control" name="Saver_Flex" value="" placeholder="Saver_Flex..."/>
                         </td>
                     </tr>
                  </table>
             </div>
             <div style="margin-left: 43.5%; width: 13%; padding-bottom: 10px;">    
                
                    <button type="submit" class="btn btn-primary btn-block">Tạo lịch</button>

                </div>
         </div>



 <?php 
    echo form_close();
 ?>   
<script type="text/javascript" src="<?= base_url() ?>js/load_SB_den.js"></script>
<div id="InsertIntoMe" ></div>